package com.java.basic;

public class OperatorTests {
    public static void main(String[] args) {
        byte a=10;
        //a=a+10; //表达式自动类型提升
        a+=10;
        //=========
        int b=10;
        int c=b+++b+++b++;
        System.out.println(b);//13
        System.out.println(c);//33

        //==========
        int d=10,e=20;
        int result=d>e?d++:e++;
        System.out.println(result);

        //&&、||
        int t1=10,t2=20;
        boolean flag=t1++>20&&t2--<20;
        System.out.println(flag);
        System.out.println(t2);//20

        //&、>>> (位运算)
        result=8/2;
        result=8>>2;
        System.out.println(result);
    }
}
